package com.itheima.Array;

public class Array1 {
    public static void main(String[] args) {
        int[] arr = new int[]{1,2,3};
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println("--------------");
        int[] arr1 = arr;
        int num = arr1.length;
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println(arr1[2]);
        System.out.println(num);
        System.out.println("----------------");
        //遍历
        for (int i = 0; i < arr1.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
